﻿//-----------------------------------------------------------------------
// <copyright file="ILogOnSource.cs" company="AFS">
// Copyright (c) AFS. All rights reserved.
//
//    This file is part of Chatbox.
//
//    Chatbox is free software: you can redistribute it and/or modify
//    it under the terms of the GNU Lesser General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    any later version.
//
//    Chatbox is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//    GNU Lesser General Public License for more details.
//
//    You should have received a copy of the GNU Lesser General Public License
//    along with Chatbox. If not, see http://www.gnu.org/copyleft/lesser.html
// </copyright>
//----------------------------------------------------------------------- 

namespace ChatBox.Interfaces
{
    using System;
    using System.Net;

    using ChatBox.DomainObjects.ResultData;
    using ChatBox.Utility;

    /// <summary>
    /// Interface to a component that can get a login cookie
    /// </summary>
    public interface ILogOnSource
    {
        /// <summary>
        /// Return the login details
        /// </summary>
        event EventHandler<EventArgs<LogOnResult>> Completed;

        /// <summary>
        /// Gets the logon cookie, or null if there is none yet
        /// </summary>
        Cookie LogOnCookie
        {
            get;
        }

        /// <summary>
        /// Start getting login details. Or return already-retrieved login details
        /// </summary>
        void GetLogOn();
    }
}